package com.example.userservice.commont;

import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.KafkaListener;

@Configuration
public class CommentMessageReceiver {

    @KafkaListener(topics = "secondTopic")
    public void receiveComment(String message) {
        // 处理收到的评论消息
        // 在用户B的界面上显示新的评论内容
        System.out.println("收到来自用户A的评论：" + message);
    }
}